package com.zh.risk.entity;

/**
 * code is far away from bug with the animal protecting
 * ┏┓　　　┏┓
 * ┏┛┻━━━┛┻┓
 * ┃　　　　　　　┃
 * ┃　　　━　　　┃
 * ┃　┳┛　┗┳　┃
 * ┃　　　　　　　┃
 * ┃　　　┻　　　┃
 * ┃　　　　　　　┃
 * ┗━┓　　　┏━┛
 * 　　┃　　　┃神兽保佑
 * 　　┃　　　┃代码无BUG！
 * 　　┃　　　┗━━━┓
 * 　　┃　　　　　　　┣┓
 * 　　┃　　　　　　　┏┛
 * 　　┗┓┓┏━┳┓┏┛
 * 　　　┃┫┫　┃┫┫
 * 　　　┗┻┛　┗┻┛
 *
 * @Description: 字段实体
 * @Author: Liard
 * @Create in: 2020/8/28 17:39
 * @Version: 1.0.1
 */

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@ApiModel(value = "字段列表")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("elec_risk_field")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RiskField extends Model<RiskField> {

    private static final long serialVersionUID = -5860609033259466647L;
    @ApiModelProperty(value = "主键", name = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "父级id", name = "parentId")
    private Long parentId;
    @ApiModelProperty(value = "系统中字段名", name = "field")
    private String field;
    @ApiModelProperty(value = "中文名称", name = "title")
    private String title;
    @ApiModelProperty(value = "字段类型1.字符串2.整形3.长整型4.浮点型", name = "type")
    private String type;
    @ApiModelProperty(value = "是否为最后叶子节点", name = "isLeaf")
    private boolean leaf;
    @TableField(exist = false, select = false)
    private List<RiskField> children;

}
